package javase.javase02.reflect;

/**
 * @author: Gan
 * @date 2021/4/24 0024 10:23
 * @description:
 **/
public class Person {
    public String name;
    private int age;
    protected boolean gender;

    public Person() {
    }

    public Person(String name, int age, boolean gender) {
        this.name = name;
        this.age = age;
        this.gender = gender;
    }

    private Person(String name) {
        this.name = name;
    }

    @Override
    public String toString() {
        return "Person{" +
                "name='" + name + '\'' +
                ", age=" + age +
                ", gender=" + gender +
                '}';
    }

    public void eat(){
        System.out.println("eat food");
    }

    private void eat(String s) {
        System.out.println("eat " + s);
    }
}
